import request from '@/utils/request'
import axios from 'axios';

//获取报告列表
export function getReportList(query) {
    return request({
        url: '/report/getReports',
        method: 'get',
        params:query
    })
}

//获取编号信息
export function getReportInfo(query) {
    return request({
        url: '/report/getNumber',
        method: 'get',
        params:query,
    })
}

// 生成报告
export function saveReport(data, cancel) {
    return request({
      url: '/report/createReport',
      method: "post",
      data: data,
      cancelToken: new axios.CancelToken(function executor(c) {
        cancel.c = c;
      })
    });
  }

// 上传模版
export function uploadReport(data) {
    return request({
        url: '/report/updateReport',
        method: 'post',
        data:data
    })
}